Don't place html in alt/title attributes, especially with thumbnails
[lhc/web/wiklou.git] / includes / SpecialPopularpages.php
index 930e3e9..7a9557d 100644 (file)
@@ -43,7 +43,7 @@ class PopularPagesPage extends QueryPage {
        function formatResult( $skin, $result ) {
                global $wgLang, $wgContLang;
                $title = Title::makeTitle( $result->namespace, $result->title );
-               $link = $skin->makeKnownLinkObj( $title, $wgContLang->convert( $title->getPrefixedText() ) );
+               $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
                $nv = wfMsg( "nviews", $wgLang->formatNum( $result->value ) );
                return "{$link} ({$nv})";
        }
@@ -54,9 +54,9 @@ class PopularPagesPage extends QueryPage {
  */
 function wfSpecialPopularpages() {
     list( $limit, $offset ) = wfCheckLimits();
-    
+
     $ppp = new PopularPagesPage();
-    
+
     return $ppp->doQuery( $offset, $limit );
 }